import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class JDialogDemo extends JFrame
{
	
	public JDialogDemo(){
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100,100,600,500);
		setTitle("TITLE");
		getContentPane().setBackground(Color.WHITE);
		getContentPane().setLayout(null);
		JButton btn = new JButton("msg");
		btn.setBounds(100,100,100,30);
		btn.addActionListener(new ActionListener(){
			public void actionPerformed(ActionEvent e){
				//JDialog d = new JDialog(this,true);
				JDialog d = new JDialog();
				d.setVisible(true);
			}
		});
		getContentPane().add(btn);

	}
	public static void main(String[] args){
		new JDialogDemo().setVisible(true);	
	}
}
